(function ($) {

            // add css to html at first,plugin code outside
            var css = "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://jqplg.googlecode.com/svn/trunk/myMenu/dedecms/css/green.css\" />";
            $("head").append(css);

            $.fn.jqplg = function (menus) {

                // plugin begin
                var outer = "<div id=\"navo\"><div id=\"navi\"><div id=\"menu\"><ul id=\"nav\">[c]</ul></div></div></div>";
                var inner = "<li><a [target] [class] [href] ><span>[text]</span></a></li><li class=\"menu_line\"></li>";
                var text = "",
                    temp = "";

                for (var m in menus) {
                    temp = inner.replace("[text]", menus[m][0]);
                    temp = menus[m][1] == "" ? temp.replace("[href]", menus[m][1]) : temp.replace("[href]", "href=\"" + menus[m][1] + "\"");
                    temp = menus[m][2] == false ? temp.replace("[class]", "") : temp.replace("[class]", "class=\"nav_on\"");
                    temp = menus[m][3] == "" ? temp.replace("[target]", menus[m][3]) : temp.replace("[target]", "target=\"" + menus[m][3] + "\"");

                    text += temp;
                }
                outer = outer.replace("[c]", text);
                $(this).append(outer);
                return this;
            }

        })(jQuery);